1. Field of the Invention
The present invention relates to a numerical controller.
2. Description of the Related Art
When creating a program to control a machine in which a workpiece (object to be processed) mounted on a table is rotated by a rotational axis, as a coordinate system used for the program, there are a case of using a coordinate system that rotates together with the rotation of a workpiece 1 (hereinafter referred to as a rotating coordinate system) as illustrated in FIG. 5, and a case of using a coordinate system that does not rotate together with the rotation of the workpiece 1 (hereinafter referred to as a non-rotating coordinate system) as illustrated in FIG. 6. In FIGS. 5 and 6, reference numeral 2 denotes a table that mounts the workpiece 1.
In particular, there is a case where the non-rotating coordinate system is used in multi-function machines having a function of a lathe and an NC lathe and a function of a machining center together. In such a case, the following two methods are used as a method of interpolating between program command points.
(1) Method A: Method of Performing Interpolation on Rotating Coordinate System
As illustrated in FIG. 7, coordinates of a starting point and a command point of a command path ((1) in FIG. 7), instructed on the non-rotating coordinate system (program coordinate system), are once converted into points on the rotating coordinate system. Then, interpolation processing is performed according to command speed on the rotating coordinate system based on converted coordinate values of the start point and the command point ((2) in FIG. 7), and each coordinate value of the interpolated path is converted to a coordinate value on the non-rotating coordinate system (program coordinate system) ((3) in FIG. 7). This method is disclosed in, for example, Japanese Patent Application Laid-Open No. 2003-195917.
(2) Method B: Method of Performing Interpolation According to Command Speed on Non-Rotating Coordinate System
As illustrated in FIG. 8, based on coordinates of a starting point and a command point of a command path ((1) in FIG. 8) commanded on the non-rotating coordinate system (program coordinate system), interpolation processing is performed according to command speed directly on the non-rotating coordinate system (program coordinate system) ((2) in FIG. 8).
The above-described method A has an advantage in that relative speed between a tool and a workpiece becomes command speed F instructed by a program instruction, but has a disadvantage in that an actual path deviates from the command path because an interpolation path viewed from the program coordinate system (non-rotating coordinate system) is affected by a rotational axis. For example, when a linear interpolation instruction is issued, an actual tool path viewed from the non-rotating coordinate system (program coordinate system) does not become a straight line as illustrated in (3) of FIG. 7.
In addition, the above-described method B has an advantage in that an interpolation path viewed from the non-rotating coordinate system (program coordinate system) is obtained as instructed, but has a disadvantage in that it is difficult to know how the relative speed between the tool and the workpiece varies because speed of the tool as viewed from the non-rotating coordinate system (program coordinate system) is the command speed.
The respective disadvantages of both the methods described above become significant when a command path length instructed by a program block is relatively long. Although the method B is desirable considering the influence of the path, in this case, there occurs a problem that quality of a cut surface deteriorates, for example, because the relative speed between the tool and the workpiece does not become the command speed as described above. Further, as it is necessary, in laser machining, to control an output of laser in accordance with the relative speed between the tool and the workpiece, there is a problem that it is difficult to make the output constant.